package com.mtsmda.chapter4.instanceofEx;

public class InstanceOfEx {

	public static void main(String[] args) {
		
		Car car = new Car();
		System.out.println(car instanceof Wheel);
		System.out.println(car instanceof com.mtsmda.chapter4.instanceofEx.sub.Wheel);
		
		Opel opel = new Opel();
		System.out.println(opel instanceof Opel);
//		System.out.println(opel instanceof com.mtsmda.chapter4.instanceofEx.sub.Opel);//Incompatible conditional operand types
		System.out.println(opel instanceof Car);
		
		int [] ints = new int[19];
		System.out.println(ints instanceof Object);
	}

}

class Car implements Wheel {
	@Override
	public void wheel(Integer countWheel) {
		System.out.println(countWheel + " wheels car");
	}
}